﻿<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="renderer" content="webkit|ie-comp|ie-stand">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
        <meta http-equiv="Cache-Control" content="no-siteapp" />
        <link rel="Bookmark" href="/favicon.ico" >
        <link rel="Shortcut Icon" href="/favicon.ico" />
        <!--[if lt IE 9]>
        <script type="text/javascript" src="__STATIC__/admin/hui/lib/html5shiv.js"></script>
        <script type="text/javascript" src="__STATIC__/admin/hui/lib/respond.min.js"></script>
        <![endif]-->
        <link rel="stylesheet" type="text/css" href="__STATIC__/admin/hui/static/h-ui/css/H-ui.min.css" />
        <link rel="stylesheet" type="text/css" href="__STATIC__/admin/hui/static/h-ui.admin/css/H-ui.admin.css" />
        <link rel="stylesheet" type="text/css" href="__STATIC__/admin/hui/lib/Hui-iconfont/1.0.8/iconfont.css" />
        <link rel="stylesheet" type="text/css" href="__STATIC__/admin/hui/static/h-ui.admin/skin/default/skin.css" id="skin" />
        <link rel="stylesheet" type="text/css" href="__STATIC__/admin/hui/static/h-ui.admin/css/style.css" />
        <!--[if IE 6]>
        <script type="text/javascript" src="__STATIC__/admin/hui/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
        <script>DD_belatedPNG.fix('*');</script>
        <![endif]-->
        <title>商家列表</title>
        <style>.btn-group .btn{ margin-left:-1px}</style>
    </head>
    <body>
        <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 数据统计 <span class="c-gray en">&gt;</span> 收款订单列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
        <div class="page-container">
            <div class="text-c">
                <span class="select-box inline radius">
                    <select id="status" name="status" class="select">
			<option value="999" {if 999==$status}selected{/if}>打款状态</option>
			<option value="0" {if 0==$status}selected{/if}>已接收</option>
			<option value="1" {if 1==$status}selected{/if}>已汇出</option>
			<option value="2" {if 2==$status}selected{/if}>已退款</option>
			<option value="3" {if 3==$status}selected{/if}>已拒绝</option>
			<option value="4" {if 4==$status}selected{/if}>待复核</option>
			<option value="5" {if 5==$status}selected{/if}>未知</option>
                    </select>
                </span>
                <span class="select-box inline radius">
                    <select id="bank_status" name="bank_status" class="select">
			<option value="all" {if 'all'==$bank_status}selected{/if}>银行状态</option>
			<option value="S" {if 'S'==$bank_status}selected{/if}>已成功</option>
			<option value="I" {if 'I'==$bank_status}selected{/if}>银行处理中</option>
			<option value="F" {if 'F'==$bank_status}selected{/if}>出款失败</option>
			<option value="W" {if 'W'==$bank_status}selected{/if}>未出款</option>
			<option value="U" {if 'U'==$bank_status}selected{/if}>未知</option>
                    </select>
                </span>
                <span class="select-box inline" style="border: none;">
                    <span class="btn-group">
                        <span class="btn btn-default radius {if $datetype=='tdy'}btn-danger{/if}" onclick="datebtn('tdy')">今日</span> 
                        <span class="btn btn-default radius {if $datetype=='ydy'}btn-danger{/if}" onclick="datebtn('ydy')">昨日</span>
                        <span class="btn btn-default radius {if $datetype=='wk'}btn-danger{/if}" onclick="datebtn('wk')">最近一周</span>
                    </span>
                </span> 日期范围：
                <input type="text" onfocus="WdatePicker({ maxDate:'#F{ $dp.$D(\'etime\')||\'%y-%M-%d\'}' })" id="stime" value="{$starttime}" class="input-text Wdate radius" style="width:120px;">
                -
                <input type="text" onfocus="WdatePicker({ minDate:'#F{ $dp.$D(\'stime\')}',maxDate:'%y-%M-%d' })" id="etime" value="{$endtime}" class="input-text Wdate radius" style="width:120px;">
                <!--<input type="text" class="input-text" style="width:250px" placeholder="输入管理员名称" id="" name="">-->
                <button type="submit" class="btn btn-success radius" id="datesearch"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
            </div>
                <table class="table table-border table-bordered table-hover table-bg table-sort">
                <thead>
                    <tr>
                        <th scope="col" colspan="15">
                            <span class="l">代付代发记录 | 共有数据：<strong class="f-30 c-danger"> {$totalNum} </strong> 条 | 金额：<strong class="f-30 c-danger"> {$totalAmount} </strong> 元 | 手续费：<strong class="f-30 c-danger"> {$totalFee} </strong> 元</span>
                        </th>
                    </tr>
                    <tr class="text-c">
                        <!--<th width="25"><input type="checkbox" name="" value=""></th>-->
                        <th width="80">商户号</th>
                        <th width="120">商户订单号</th>
                        <th width="100">系统订单号</th>
                        <th width="50">金额（元）</th>
                        <th width="60">手续费（元）</th>
                        <th width="50">收款人</th>
                        <th width="100">银行名称</th>
                        <th width="130">银行卡号</th>
                        <th width="130">时间</th>
                        <th width="60">打款状态</th>
                        <th width="60">银行状态</th>
                        <th width="100">备注</th>
                        <!--<th width="100">操作</th>-->
                    </tr>
                </thead>
                <tbody>
                {foreach name="$withdrawal" item="vo" key="k"}
                    <tr class="text-c">
                        <!--<td><input type="checkbox" value="{$vo.id}" name="id[]"></td>-->
                        <td>{$vo.merchant_id}</td>
                        <td>{$vo.mchnt_orderid}</td>
                        <td>{$vo.mchnt_batchid}</td>
                        <td>{$vo.amount}</td>
                        <td>{$vo.fee}</td>
                        <td>{$vo.account_name}</td>
                        <td>{$vo.bank_code}</td>
                        <td>{$vo.account_number}</td>
                        <td>{$vo.create_time|date='Y-m-d H:i:s',###}</td>
                        <td class="td-status">
                            {switch $vo.status}
                                {case 0}<span class="label label-default radius">已接收</span>{/case}
                                {case 1}
                                    {if $vo.is_notice == 0}<span class="label label-secondary radius">已汇出-未通知</span>{/if}
                                    {if $vo.is_notice == 1}<span class="label label-success radius">已汇出-已通知</span>{/if}
                                {/case}
                                {case 2}<span class="label label-primary radius">已退款</span>{/case}
                                {case 3}<span class="label label-danger radius">已拒绝</span>{/case}
                                {case 4}<span class="label label-warning radius">待复核</span>{/case}
                                {case 5}<span class="label label-warning radius">未知</span>{/case}
                            {/switch}
                        </td>
                        <td class="td-status">
                            {switch $vo.bank_status}
                                {case S}<span class="label label-success radius">已成功</span>{/case}
                                {case I}<span class="label label-secondary radius">银行处理中</span>{/case}
                                {case F}<span class="label label-danger radius">出款失败</span>{/case}
                                {case W}<span class="label label-danger radius">未出款</span>{/case}
                                {case U}<span class="label label-warning radius">未知</span>{/case}
                            {/switch}
                        </td>
                        <td>{$vo.remark}</td>
<!--                        <td class="f-14">
                            <a title="详情" href="javascript:;" onclick="withdrawal_detail('订单详情', '{:url('stats/withdrawalDetail',array('mchnt_batchid'=>$vo.mchnt_batchid))}', '{$vo.mchnt_batchid}', '800', '500')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe627;</i></a>
                        </td>-->
                    </tr>                    
                {/foreach}
                </tbody>
            </table>
        </div>
        <!--_footer 作为公共模版分离出去-->
        <script type="text/javascript" src="__STATIC__/admin/hui/lib/jquery/1.9.1/jquery.min.js"></script> 
        <script type="text/javascript" src="__STATIC__/admin/hui/lib/layer/2.4/layer.js"></script>
        <script type="text/javascript" src="__STATIC__/admin/hui/static/h-ui/js/H-ui.min.js"></script> 
        <script type="text/javascript" src="__STATIC__/admin/hui/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

        <!--请在下方写此页面业务相关的脚本-->
        <script type="text/javascript" src="__STATIC__/admin/hui/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
        <script type="text/javascript" src="__STATIC__/admin/hui/lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
        <script type="text/javascript" src="__STATIC__/admin/hui/lib/laypage/1.2/laypage.js"></script>
        <script type="text/javascript">
            $(function(){
                $('.table-sort').dataTable({
                    "aaSorting": [[ 8, "desc" ]],//默认第几个排序
                    "bStateSave": true,//状态保存
                    "aoColumnDefs": [
//                        {"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
                        {"orderable":false,"aTargets":[0,7]}// 制定列不参与排序
                    ]
                });
                
                $('#datesearch').click(function(){
                    var status = $("#status").val();
                    var bank_status = $("#bank_status").val();
                    var stime = $("#stime").val();
                    var etime = $("#etime").val();
                    window.location.href="{:url('bis/stats/withdrawal')}?stime="+stime+"&etime="+etime+"&status="+status+"&bank_status="+bank_status;
                });
            });
                
            function datebtn(type){
                var status = $("#status").val();
                var bank_status = $("#bank_status").val();
                window.location.href="{:url('bis/stats/withdrawal')}?datetype="+type+"&status="+status+"&bank_status="+bank_status;
            };
                
            /*
             * 参数解释：
             * title	标题
             * url		请求的url
             * id		需要操作的数据id
             * w		弹出层宽度（缺省调默认值）
             * h		弹出层高度（缺省调默认值）
             * */
            /*管理员-增加*/
            function bis_add(title, url, w, h) {
                layer_show(title, url, w, h);
            }
            /*管理员-删除*/
            function bis_del(obj, id) {
                layer.confirm('确认要删除id为'+id+'的数据吗？', function (index) {
                    $.ajax({
                        type: 'POST',
                        data:{'id': id},
                        url: "{:url('bis/bisDel')}",
                        dataType: 'json',
                        success: function (data) {
//                            $(obj).parents("tr").remove();
                            layer.msg(data, {icon: 1, time: 1000},function(){
                                location.reload();
                            });
                        },
                        error: function (data) {
                            console.log(data.msg);
                        }
                    });
                });
            }
            /*管理员-详情*/
            function withdrawal_detail(title, url, id, w, h) {
                layer_show(title, url, w, h);
            }
        </script>
    </body>
</html>